{% extends 'layout.html' %}
{% block page_title %}我的订单-共喜财富{% endblock %}
{% block  content %}
    <style type="text/css">
        .active{
            color:#ffcb2f
        }
        table {
            margin-left: 70px;
            border: 1px solid #fff;
            height: auto;
            width: 700px;
        }

        tr, td {
            border: 1px solid #fff;
            text-align: center
        }

        tr.active {
            background: #ffcb2f;
        }
    </style>
    <body class=" splashing"><!-- uiView:  -->
    <div ui-view="" class="splashing_inner ng-scope">
        <div class="head ng-scope"></div>
        <div class="s_content clearfix ng-scope">
            <div class="por_open por">
                <h2><i class="i_folder_1"></i>我的订单</h2>
                <table style="">
                    <thead>
                    <tr style="border: 1px solid #fff">
                        <td colspan="2">产品</td>
                        <td colspan="2">金额(元)</td>
                        <td>时间</td>
                        <td>订单号</td>
                        <td>状态</td>
                    </tr>
                    </thead>
                    <tbody>
                    {% for o in orders %}
                        <tr>
                            {% if loop.index==1 %}
                            <td colspan="2" rowspan="{{ order_count }}">注资宝</td>
                        {% endif %}
                            <td colspan="2">{{ o.money }}</td>
                            <td>{{ o.create_time }}</td>
                            <td>{{ o.trade_no or '无' }}</td>
                            <td>
                                {% if not o.trade_no %}
                                    <a href="/user/pay?order_id={{ o.id }}" class="active">待支付</a>
                                {% else %}
                                    已支付
                                {% endif %}
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>


        </div>
        <div class="footer ng-scope">
            <div class="footer-bottom">
                <footer class="global-footer">

                    <div class="copyright">
                        <div class="container">
                            <p>
                                <span>© 2015 <a href="/" target="_blank">DataYes</a></span>
                                <a class="icp" href="http://www.miibeian.gov.cn/" target="_blank">沪ICP备13045831号</a>
                                <span>咨询热线：4000 820 386</span>

                                <a href="/protocol" target="_blank" class="agreement">用户协议</a>
                            </p>
                        </div>
                    </div>
                </footer>
            </div>
        </div>


    </div>
    <div class="alert-wrapper" ng-class="{onTop: (notifications.length > 0)}">
        <!-- ngRepeat: notify in notifications -->
    </div>
    <div global-footer="" class="ng-isolate-scope"></div>
    <div class="global-bar2 clearfix">

        <div class="container">

            <div class="logo">
                <a href="/"><img src="/static/img/header-logo.png"></a>
            </div>
            <div class="global-nav"></div>
            <div class="pull-right">

                <a class="btn-login btn" href="javascript:void(0);" style="display: none;">登录</a>
                <a class="btn-register btn" href="javascript:void(0);" style="display: none;">注册</a>

                <div class="profile nlogin" style="display: inline-block;">
                    <div class="detail">
                        <span class="owner">共喜财富</span>
                        <span class="username">{{ g.user.name }}</span>
                    </div>
                    <div class="dropdown">
                        <div class="dropdown-toggle" data-toggle="dropdown">
                            <img class="avatar default-avatar" src="/static/images/avatar-bg.png">
                        </div>
                        <ul class="dropdown-menu" role="menu">
                            <li>
                                <a href="#userinfo">
                                    <span>设置</span>
                                </a>
                            </li>
                            <li>
                                <a href="/logout">
                                    <span>退出</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>

            </div>

        </div>

    </div>
    <div class="message-center-notifies"></div>
    </body>
    <script type="text/javascript">
        $(".default-avatar").click(function () {
            $(".dropdown-menu").toggle()
        })
{#        $("tbody tr").hover(function () {#}
{#                    $(this).addClass("active")#}
{#                },#}
{#                function () {#}
{#                    $(this).removeClass("active")#}
{#                })#}

    </script>
{% endblock %}